package com.definity.toolkit;

import com.definity.toolkit.i18n.I18n;
import com.definity.toolkit.i18n.I18nFactory;

public class I18nException extends ToolkitRuntimeException {

	private static final long serialVersionUID = 4524924085956070801L;

	private static final String PREFIX = "exception.";

	public I18nException(String message, Throwable cause) {
		super(i18n().tl(PREFIX + message), cause);
	}

	public I18nException(String message) {
		super(i18n().tl(PREFIX + message));
	}

	public static I18n i18n() {
		return I18nFactory.create("messages");
	}
	
}
